package com.test.restruant.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.test.restruant.dao.BillDAO;
import com.test.restruant.pojo.Bill;
import com.test.restruant.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(timeout = 30000)
public class BillServiceImpl implements BillService {
    @Autowired
    private BillDAO billDAO;

    @Override
    public Bill getBillById(Integer id) {
        return billDAO.getBillById(id);
    }

    @Override
    public void updateBill(Bill bill) {
        billDAO.updateBill(bill);
    }

    @Override
    public List<Bill> getBillList() {
        return billDAO.getBillList();
    }

    @Override
    public Bill getBillByNum(String num) {
        return billDAO.getBillByNum(num);
    }
}
